<div class="right-main" >
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            背景图
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <div *ngIf="uploading" style="padding: 5px 20px">
                <nz-spin></nz-spin>
                上传中...
            </div>
            <button nz-button class="file-upload mt-sm">
                <input id="file1" accept type="file" (change)="fileChange($event)" />
                <i class="anticon anticon-upload"></i><span>上传背景图</span>
            </button>
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            企业组编辑
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <div class="round-box">
                <p>
                    <img style="width: 20px;height: 20px;margin-right: 5px" [src]="rightData.origin.groupTwo.originGroup.img? this.http.IP_PORT + rightData.origin.groupTwo.originGroup.img: '../../assets/img/user.png'" alt="">
                    <button nz-button class="file-upload mt-sm" style="margin-top: 0 !important;">
                        <input id="file1" accept type="file" (change)="fileChange($event, 'originMain')" />
                        <i class="anticon anticon-upload"></i><span>总图标</span>
                    </button>
                </p>
            </div>
            <button (click)="addGroup()" nz-button [nzType]="'default'" style="margin-bottom: 5px" [disabled]="disabled" class="mr-sm">
                <span>添加</span>
            </button>
            <div class="round-box" *ngFor="let item of rightData.origin.groupTwo.originGroup.originGroupArr; let i = index">
                <p>
                    第{{i+1}}组 <span style="cursor: pointer" (click)="removeGroupTwoArr(i)"><i style="color:#c00;" class="anticon anticon-close"></i></span>
                </p>
                <p>
                    <img style="width: 20px;height: 20px;margin-right: 5px" [src]="item.img? this.http.IP_PORT + item.img: '../../assets/img/user.png'" alt="">
                    <button nz-button class="file-upload mt-sm" style="margin-top: 0 !important;">
                        <input id="file1" accept type="file" (change)="fileChange($event, 'origin', i)" />
                        <i class="anticon anticon-upload"></i><span>图标</span>
                    </button>
                </p>
                <p>
                    <span>组名</span>
                    <nz-input #color [nzType]="'text'" [(ngModel)]="item.name" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
                </p>
                <p>
                    <span>人数</span>
                    <nz-input #color [nzType]="'number'" [(ngModel)]="item.num"   appMargin [bottom]="5" [nzRows]="'4'" name="color1" [disabled]="true"></nz-input><br />
                </p>
            </div>
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            是否添加消费者组
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <p>
                <nz-radio-group [(ngModel)]="rightData.origin.hasConsumer">
                    <label nz-radio [nzValue]="true">
                        <span>是</span>
                    </label>
                    <label nz-radio [nzValue]="false">
                        <span>否</span>
                    </label>
                </nz-radio-group>
            </p>
        </div>
    </div>
    <div nz-row nzType="flex" *ngIf="rightData.origin.hasConsumer">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            消费者编辑
        </div>
    </div>
    <div nz-row nzType="flex" *ngIf="rightData.origin.hasConsumer">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <div class="round-box">
                <p>
                    <img style="width: 20px;height: 20px;margin-right: 5px" [src]="rightData.origin.groupTwo.consumerGroup.img? this.http.IP_PORT + rightData.origin.groupTwo.consumerGroup.img: '../../assets/img/user.png'" alt="">
                    <button nz-button class="file-upload mt-sm" style="margin-top: 0 !important;">
                        <input id="file1" accept type="file" (change)="fileChange($event, 'consumer')" />
                        <i class="anticon anticon-upload"></i><span>图标</span>
                    </button>
                </p>
                <p>
                    <span>组名</span>
                    <nz-input #color [nzType]="'text'" [(ngModel)]="rightData.origin.groupTwo.consumerGroup.name" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
                </p>
                <p>
                    <span>人数</span>
                    <nz-input #color [nzType]="'number'" [(ngModel)]="rightData.origin.groupTwo.consumerGroup.num" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
                </p>
            </div>
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            内容
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <button (click)="addRound()" nz-button [nzType]="'default'" style="margin-bottom: 5px" [disabled]="disabled" class="mr-sm">
                <span>添加标题</span>
            </button>
            <div class="round-box" *ngFor="let item of rightData.origin.roundArr; let i = index">
                <p>
                    <span>企业组</span>
                    <nz-input #color [nzType]="'text'" [(ngModel)]="item.originTitle" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
                </p>
                <p *ngIf="rightData.origin.hasConsumer">
                    <span>消费者</span>
                    <nz-input #color [nzType]="'text'" [(ngModel)]="item.consumerTitle" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
                </p>
            </div>
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">
            <i class="anticon anticon-file-text"></i>
        </div>
        <div nz-col [nzSpan]="20">
            设置投票问题
        </div>
    </div>
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <nz-input #color style="width: 80%;" [nzType]="'textarea'" [(ngModel)]="rightData.origin.questionTile" appMargin [bottom]="5" [nzRows]="'4'" name="color1" ></nz-input><br />
        </div>
    </div>
    <!--<div nz-row nzType="flex">-->
        <!--<div nz-col [nzSpan]="4">-->
            <!--<i class="anticon anticon-file-text"></i>-->
        <!--</div>-->
        <!--<div nz-col [nzSpan]="20">-->
            <!--数据来源-->
        <!--</div>-->
    <!--</div>-->
    <!--<div nz-row nzType="flex">-->
        <!--<div nz-col [nzSpan]="4">-->

        <!--</div>-->
        <!--<div nz-col [nzSpan]="20">-->
            <!--<nz-checkbox-group [(ngModel)]="comeList" (ngModelChange)="checkChange(comeList)"></nz-checkbox-group>-->
        <!--</div>-->
    <!--</div>-->
    <div nz-row nzType="flex">
        <div nz-col [nzSpan]="4">

        </div>
        <div nz-col [nzSpan]="20">
            <button nz-button [nzType]="'primary'" (click)="save()" [disabled]="uploading" class="mr-sm">
                <span>保存</span>
            </button>
            <button nz-button [nzType]="'danger'" (click)="deleteComponent()" [disabled]="uploading" class="mr-sm">
                <span>删除</span>
            </button>
        </div>
    </div>
</div>
